﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>


<%@ Register assembly="MyControlLibrary" namespace="com.demo" tagprefix="cc1" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <br />
          
        <asp:FileUpload ID="FileUpload1" runat="server" />
       
<cc1:UploadButton ID="UploadButton1" runat="server" Text="Upload">
<UploadProgressSetting DueTime="1000" Period="1000" Enabled="True" CallbackFunc="callback"></UploadProgressSetting>
</cc1:UploadButton>
       
        <br />
        <hr />
        <asp:Label ID="Label1" runat="server"></asp:Label>
        <br />
       
        <table style="width:800px">
            <tr>
                <td id="barCell" style="width:0%; height:10px; background-color:Green;"></td>
                <td id="percentCell" style="width:100%"></td>
            </tr>
        </table>



<script type="text/javascript">
    function callback(result) {

        

        var elemBar = document.getElementById("barCell");
        var elemPercent = document.getElementById("percentCell");

        elemBar.style.width = result + "%";
        elemPercent.innerHTML = result + "%"
    }
            
</script>

    </div>

    </form>
</body>
</html>
